<extend name="Public:Base" />
<block name="content">
	<div class="main-title">
		<h2><eq name="ACTION_NAME" value='add'>新增<else />编辑</eq>链接 [ <A HREF="__URL__">返回列表</A> ]</h2>
	</div>
	<FORM METHOD="POST" id="form1" class="form-horizontal" action="__URL__/<eq name="ACTION_NAME" value="add">insert<else />update</eq>" enctype="multipart/form-data">
		<div class="form-item cf">
			<label class="item-label">标题：<span class="check-tips"></span></label>
			<div class="controls">
				<input type="text" class="text input-large" id="title" name="title" value="{$vo.title}" datatype="*1-30" nullmsg="标题不能为空" errormsg="标题长度不能超过30个字">
			</div>
		</div>
		<div class="form-item cf">
			<label class="item-label">LOGO地址：</label>
			<div class="controls"><INPUT TYPE="text" class="text input-large" NAME="logo" value="{$vo.logo}">
			</div>
		</div>
		<div class="form-item cf">
			<label class="item-label">链接地址：</label>
			<div class="controls"><INPUT TYPE="text" class="text input-large" NAME="url" value="{$vo.url}">
			</div>
		</div>
		<div class="form-item cf">
			<label class="item-label">描 述：</label>
			<div class="controls">
				<label class="textarea">
					<textarea class="text input-large" NAME="remark" >{$vo.remark}</textarea>
				</label>
			</div>
		</div> 
		<div class="form-item cf">
			<label class="item-label">排   序：</label>
			<div class="controls"><INPUT TYPE="text" class="text input-large" NAME="sort" value="{$vo.sort|default=0}">
			</div>
		</div>
		<div class="form-item">
			<INPUT TYPE="hidden" name="id" value="{$vo.id}">
			<INPUT TYPE="hidden" name="jumpurl" value="{$Think.server.HTTP_REFERER}">
			<button type="submit" class="btn submit-btn ajax-post">确 定</button>
			<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
		</div>
	</FORM>
	<script type="text/javascript">
	$(function(){
		$('#form1').Validform({
			tiptype:function(msg,o,cssctl){
                if(!o.obj.is("form")){
                	var pele=o.obj.parents('.form-item');
                    var infoObj=pele.find(".check-tips");
                    if (!infoObj || infoObj.length==0){
                        pele.find(".item-label").append('<span class="check-tips"></span>');
                    }
                    infoObj=pele.find(".check-tips");
                    if(o.type==2){
                        infoObj.removeClass('error');
                        infoObj.hide();
                    }else{
                        infoObj.addClass('error');
                        infoObj.html(msg).show();
                    }
                }
            }
		});
	})
	</script>
</block>